


import 'package:fijkplayer_plus/fijkplayer_plus.dart';

import 'player_platform_interface.dart';

class Player  extends FijkPlayer{
  static const asset_url_suffix="asset:///";
  Future<String?> getPlatformVersion() {
    return PlayerPlatform.instance.getPlatformVersion();
  }

  void setPlayerPath(String url,{
    SourceType type=SourceType.net,
    bool autoPlay=false,
    showCover=false
  }){
    if(type==SourceType.asset && !url.startsWith(asset_url_suffix)){
      url=asset_url_suffix+url;
    }
    setDataSource(url,autoPlay:autoPlay,showCover:showCover);
  }
}
enum SourceType{
  net,asset
}
